package main

import (
	"store/config"
	"store/controller"
	"store/entity"
	"store/service"

	"github.com/cihub/seelog"
)

func bootstrap() {
	config.InitLog()
	config.InitConfig()

	// 检测存储服务是否正常
	fileStoreService := service.FileStoreService{}
	fileStoreService.CheckOrDown()

	entity.InitDb()
	controller.InitRouter()
}

func main() {
	bootstrap()
	seelog.Info("存储服务已启动")
	controller.StartHTTP()
}
